<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        IPPI Admin Page
        <small>Case Reporting</small>
    </h1>
</section>

<!-- Main content -->
<section class="content">
    <!-- Main row -->
    <div class="row">
        <div class="col-md-12">
            <div id="msg" class="alert alert-danger alert-dismissable">
                <i class="fa fa-ban"></i>
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">�</button>
                <b>Alert!</b> Danger alert preview. This alert is dismissable. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.
            </div>
        </div>
        <!-- right col (We are only adding the ID to make the widgets sortable)-->
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">Data Table</h3>                                    
                </div><!-- /.box-header -->
                <div class="box-body table-responsive">
                        <!-- .table - Uses sparkline charts-->
                    <table id="example2" class="table table-striped">
                        <thead>
                            <tr>
                                <th>No &nbsp;</th>
                                <th>Pelapor</th>
                                <th class="text-center">Sebagai &nbsp;</th>
                                <th>Nama Korban</th>
                                <th class="text-center">Tanggal Laporan</th>
                                <th>Status</th>
                                <th>Action </th>
                            </tr>
                        </thead>
                        <tbody>
                        
                        <?php
                        $i=1;
                        foreach($list_data as $r):
                        ?>

                            <tr <?php if($r->read == 0){echo"style='font-weight:bolder;'";}?>>
                                <td><?php echo $i++;?></td>
                                <td><?php echo $r->email_pelapor;?></td>
                                <td class="text-center">
                                    <?php 
                                    if(strtolower($r->alias) == "saksi"){
                                        ?>
                                    <span class="label label-primary">Saksi</span>
                                            <?php
                                    }
                                    else{
                                        ?>
                                    <span class="label label-default">Korban</span>
                                            <?php
                                    }?>
                                </td>
                                <td><?php echo $r->korban_name;?></td>
                                <td class="text-center">
                                    <?php
                                    $newDate = date("d M Y <b>h:m:s<b>", strtotime($r->datecreated));
                                    echo $newDate;
                                    ?>
                                </td>
                                <td>
                                    <?php
                                    if($r->status == 0){
                                        ?>
                                    <span class="text-yellow"><i class="fa fa-warning"></i>&nbsp;pending</span>
                                            <?php
                                    }
                                    else{
                                        ?>
                                    <span class="text-green"><i class="fa fa-check-circle"></i>&nbsp;processed</span>
                                            <?php
                                    }
                                    ?>
                                </td>
                                <td>
                                    <a class="btn btn-xs btn-info" href="<?php echo site_url()?>admin_reporting/detail/<?php echo $r->id_kasus;?>">detail</a>
                                    <a class="btn btn-xs btn-danger delete_kasus" href="#" data-id="<?php echo $r->id_kasus;?>">hapus</a>
                                </td>
                            </tr>
                        <?php
                        endforeach;
                        ?>
                        </tbody>
                    </table><!-- /.table -->
                </div>
            </div>
            <!-- Map box -->
            
            <!-- /.box -->
            
            
        </div><!-- right col -->
    </div><!-- /.row (main row) -->
</section><!-- /.content -->